package com.snaildesign.countdown.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Set;
import org.apache.commons.lang.builder.ToStringBuilder;


/** 
 *        @hibernate.class
 *         table="ITEM_SPEC"
 *     
*/
public class ItemSpec implements Serializable {

    /** identifier field */
    private String itemSpecId;

    /** nullable persistent field */
    private BigDecimal name;

    /** nullable persistent field */
    private String description;

    /** nullable persistent field */
    private String dataType;

    /** nullable persistent field */
    private Date createDt;

    /** persistent field */
    private Set countDownExps;

    /** full constructor */
    public ItemSpec(String itemSpecId, BigDecimal name, String description, String dataType, Date createDt, Set countDownExps) {
        this.itemSpecId = itemSpecId;
        this.name = name;
        this.description = description;
        this.dataType = dataType;
        this.createDt = createDt;
        this.countDownExps = countDownExps;
    }

    /** default constructor */
    public ItemSpec() {
    }

    /** minimal constructor */
    public ItemSpec(String itemSpecId, Set countDownExps) {
        this.itemSpecId = itemSpecId;
        this.countDownExps = countDownExps;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="ITEM_SPEC_ID"
     *         
     */
    public String getItemSpecId() {
        return this.itemSpecId;
    }

    public void setItemSpecId(String itemSpecId) {
        this.itemSpecId = itemSpecId;
    }

    /** 
     *            @hibernate.property
     *             column="NAME"
     *             length="22"
     *         
     */
    public BigDecimal getName() {
        return this.name;
    }

    public void setName(BigDecimal name) {
        this.name = name;
    }

    /** 
     *            @hibernate.property
     *             column="DESCRIPTION"
     *             length="200"
     *         
     */
    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    /** 
     *            @hibernate.property
     *             column="DATA_TYPE"
     *             length="1"
     *         
     */
    public String getDataType() {
        return this.dataType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType;
    }

    /** 
     *            @hibernate.property
     *             column="CREATE_DT"
     *             length="7"
     *         
     */
    public Date getCreateDt() {
        return this.createDt;
    }

    public void setCreateDt(Date createDt) {
        this.createDt = createDt;
    }

    /** 
     *            @hibernate.set
     *             lazy="true"
     *             inverse="true"
     *             cascade="none"
     *            @hibernate.collection-key
     *             column="ITEM_SPEC_ID"
     *            @hibernate.collection-one-to-many
     *             class="com.snaildesign.countdown.model.CountDownExp"
     *         
     */
    public Set getCountDownExps() {
        return this.countDownExps;
    }

    public void setCountDownExps(Set countDownExps) {
        this.countDownExps = countDownExps;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("itemSpecId", getItemSpecId())
            .toString();
    }

}
